<?php
/***
* @version $Id: policy.php 336 2007-01-23 08:12:56Z flexiondotorg $
* @copyright (c) 2006 - 2007 Flexion.Org
*            (c) 2004 - 2005 Project Minerva
*            (c) 2003 - 2004 Sko22 < sko22@quellicheilpc.com > http://www.quellicheilpc.com/
*            (c) 2001 - 2006 phpBB Group
* @license   http://opensource.org/licenses/gpl-license.php GNU Public License
***/

define('IN_R3BORN', true);
$root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_POLICY);
init_userprefs($userdata);
//
// End session management
//

$id = get_var('id', REGISTRATION_POL_ID);

$policy = get_policy($id, 'both');

if( $policy !== FALSE )
{
	$name = $policy['NAME'];
    $text = $policy['TEXT'];
    $date = create_date($lang['DATE_FORMAT'], $policy['DATE'], $config['board_timezone']);
}
else
{
	message_die (GENERAL_MESSAGE, 'There are no site wide policies available', $lang['Policies']);
}

unset($policy);

//
// Lets build a page ...
//
page_header($lang['Policies']);

$template->set_filenames(array(
    'body' => 'policy_body.tpl')
);

$template->assign_vars(array(
	'L_POLICY' => $lang['Policy'],
	'L_DATE'     => $lang['Date'],
	'POLICY_NAME' => $name,
	'POLICY_TEXT' => $text,
	'POLICY_DATE' => $date
	)
);

$template->pparse('body');

page_footer();

?>